/* Copyright (c) 2010 OFXKit
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#import <Foundation/Foundation.h>
#import "OFXObject.h"

@interface OFXImage : OFXObject {
  NSString* checkImageType;
  NSDate*   dateAvailable;
  NSData*   imageData;
  NSString* imageReference;
  NSString* imageReferenceType;
  NSNumber* imageTTL;
  NSString* imageType;
  NSURL*    imageURL;
}

/**
 * @property checkImageType
 * @brief Check image information. 
 *
 * One of the following: 
 * - FRONTONLY: The image contains the front of the check. 
 * - BACKONLY: The image contains the back of the check. 
 * - FRONTANDBACK: The image contains both the front and back of the check.
 */
@property(retain) NSString* checkImageType;

/**
 * @property dateAvailable
 * @brief Date image will become available on server.
 */
@property(retain) NSDate*   dateAvailable;

/**
 * @property imageData
 * @brief Raw image data as loaded from server.
 */
@property(retain) NSData*   imageData;

/**
 * @property imageReference
 * @brief Server specified unique identifier for the image to be used during 
 * the request for the image. Can be either image identifier or URL, depending 
 * on the value of <IMAGEREFTYPE>, A-1024
 */
@property(retain) NSString* imageReference;

/**
 * @property imageReference
 * @brief Type of image reference
 * 
 * - OPAQUE: The image is accessed via an explicit OFX <IMAGERQ> request, which
 * will be followed by the image data.
 *
 * - URL: The image is accessed directly via the URL provided. The image cannot
 * be retrieved via an OFX image request. The expectation is that the client
 * will not provide authentication and will simply follow the URL provided.
 *
 * - FORMURL: The image is accessed directly via an encoded URL. The image 
 * cannot be retrieved via an OFX image request. The expectation is that the 
 * client will send authentication to the server. 
 */
@property(retain) NSString* imageReferenceType;

/**
 * @property imageType
 * @brief Type of image. 
 * 
 * One of the following: 
 * - STATEMENT: the image is a statement image 
 * - TRANSACTION: the image is a transaction image (e.g. a check image) 
 * - TAX: the image is a tax image
 */
@property(retain) NSString* imageType;

/**
 * @property imageTTL
 * @brief Number of calendar days the image will remain available on the host 
 * once the image becomes available, N-5
 */
@property(retain) NSNumber* imageTTL;

/**
 * @property imageURL
 * @brief URL of image data.
 */
@property(retain) NSURL* imageURL;

@end
